<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <p id="p1">hello jack</p>
    <p id="p2">hello lili</p>
    <script>
      const p1 = document.getElementById("p1");
      const p2 = document.getElementById("p2");

      p2.oncopy = function (e) {
        e.preventDefault();
        console.log("oncopy");
      };

      p1.onmousedown = function (e) {
        e.preventDefault();
      };

      p1.ondblclick = function (e) {
        console.log("ondblclick");
      };
    </script>
  </body>
</html>
